
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DatatableCustomindexComponent } from './components/customtable/customindex/customindex.component';
import { DatatableOwnerComponent } from './components/customtable/owner/owner.component';
import { DatatableDriverComponent } from './components/customtable/driver/driver.component';
import { DatatableOperationtableComponent } from './components/operationtable/operationtable.component';
import { DatatableOrderReportingComponent } from './reporting/components/order-reporting/order-reporting.component';
import { DatatableDataindexComponent } from './components/dataindex/dataindex.component';
import { DatatableComplianceIndexComponent } from './components/compliance/index/index.component';
import { DatatableFinancetableComponent } from './components/financetable/financetable.component';
import { DatatableInvoicetableComponent } from './components/invoicetable/invoicetable.component';
import { DatatableComplianceSalesmanComponent } from './components/compliance/salesman/salesman.component';
import { DatatableComplianceCustomerComponent } from './components/compliance/customer/customer.component';
import { DatatableFundReportingComponent } from './reporting/components/fund-reporting/fund-reporting.component';
import { DatatableMancustomtableComponent } from './components/customtable/mancustomtable/mancustomtable.component';
import { DatatablePartnertableComponent } from './components/customtable/partnertable/partnertable.component';
import { DatatableBusiindexComponent } from './components/busitable/busiindex/busiindex.component';
import { DatatableMantableComponent } from './components/busitable/mantable/mantable.component';
import { DatatableReportingFundInfoComponent } from './reporting/components/fund-info/fund-info.component';
import { DatatableDatascreenComponent } from './components/datascreen/datascreen.component';
import { DatatableFundOrderComponent } from './reporting/components/fund-order/fund-order.component';
import { DatatableFundOrderSucceedComponent } from './reporting/components/fund-orderSucceed/fund-orderSucceed.component';

const routes: Routes = [
  { path: 'dataindex', component: DatatableDataindexComponent, data: { guard: { ability: ['dataindex-search'] } } },
  { path: 'customtable/customindex', component: DatatableCustomindexComponent, data: { guard: { ability: ['customindex-client'] } } },
  { path: 'customtable/owner', component: DatatableOwnerComponent, data: { guard: { ability: ['owner-search'] } } },
  { path: 'customtable/driver', component: DatatableDriverComponent, data: { guard: { ability: ['driver-search'] } } },
  {
    path: 'customtable/mancustomtable',
    component: DatatableMancustomtableComponent,
    data: { guard: { ability: ['mancustomtable-search'] } }
  },
  { path: 'customtable/partnertable', component: DatatablePartnertableComponent,
  data: { guard: { ability: ['partnertable-search'] } } },
  { path: 'operationtable', component: DatatableOperationtableComponent, data: { guard: { ability: ['operationtable-search'] } }  },
  { path: 'reporting/order', component: DatatableOrderReportingComponent, data: { guard: { ability: ['ORDER-REPORTING-search'] } } },
  { path: 'compliancetabel/index', component: DatatableComplianceIndexComponent , data: { guard: { ability: ['index-lRateQualified'] } }},
  { path: 'compliancetabel/salesman', component: DatatableComplianceSalesmanComponent, data: { guard: { ability: ['salesman-ComplianceReportPage'] } } },
  { path: 'compliancetabel/customer', component: DatatableComplianceCustomerComponent, data: { guard: { ability: ['customer-search'] } } },
  { path: 'financetable', component: DatatableFinancetableComponent , data: { guard: { ability: ['financetable-search'] } }},
  { path: 'invoicetable', component: DatatableInvoicetableComponent , data: { guard: { ability: ['invoicetable-search'] } }},
  { path: 'reporting/fund', component: DatatableFundReportingComponent , data: { guard: { ability: ['FUND-REPORTING-search'] } }},
  { path: 'reporting/superviseOrder', component: DatatableFundOrderComponent , data: { guard: { ability: ['Order-search'] } }},
  { path: 'reporting/superviseOrderSucceed', component: DatatableFundOrderSucceedComponent , data: { guard: { ability: ['superviseOrderSucceed-search'] } }},
  
  { path: 'busitable/busiindex', component: DatatableBusiindexComponent , data: { guard: { ability: ['busiindex-search'] } }},
  { path: 'busitable/mantable', component: DatatableMantableComponent, data: { guard: { ability: ['customer-search'] } } },
  { path: 'fund-info', component: DatatableReportingFundInfoComponent , data: { guard: { ability: ['customer-search'] } }},
  { path: 'datascreen', component: DatatableDatascreenComponent, data: { guard: { ability: ['datascreen-search'] } } }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class DatatableRoutingModule {}
